package com.shanzmoo.db.module.member.domain.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.shanzmoo.db.module.member.entity.MemberCardConfigEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 门店会员卡管理
 * </p>
 *
 * @author wangyudi
 * @since 2021-03-30
 */
@Data
public class MemberCardConfigDTO {

    /**
     * 是否引导注册充值 0-否 1-是
     */
    @ApiModelProperty("是否引导注册充值 0-否 1-是")
    private Boolean guideFlag;

    /**
     * 门店编号
     */
    @ApiModelProperty("默认门店编号")
    private String shopCode;

    /**
     * 会员密码
     */
    @ApiModelProperty("会员密码")
    private String password;
    @NotEmpty(message = "验证码为空")
    @ApiModelProperty("验证码")
    private String verifyCode;

    @ApiModelProperty("会员卡满赠金额")
    List<MemberCardConfigDetailDTO> cardConfigDetail;

    public void createEntity(MemberCardConfigEntity entity){
        entity.setGuideFlag(guideFlag);
        entity.setPassword(password);
        entity.setShopCode(shopCode);
    }
}
